package com.bytedance.improvingroad.banner_test.banner_frags

import com.bytedance.improvingroad.BaseFragment
import com.bytedance.improvingroad.R
import com.bytedance.improvingroad.banner_test.BannerModel
import com.bytedance.improvingroad.banner_test.ImageAdapter
import com.bytedance.improvingroad.databinding.DepthFragmentBinding
import com.youth.banner.indicator.CircleIndicator
import com.youth.banner.transformer.DepthPageTransformer

/**
 * Created by chenxiong
 * date 12/7/21
 */
class DepthFragment: BaseFragment<DepthFragmentBinding>() {
    val bannerModels = listOf(
        BannerModel(R.drawable.pic1,"巩俐不低俗，我就不能低俗"),
        BannerModel(R.drawable.pic2,"朴树又回来了，再唱经典老歌引万人大合唱"),
        BannerModel(R.drawable.pic3,"揭秘北京电影如何升级"),
        BannerModel(R.drawable.pic4,"乐视网TV版大派送"),
        BannerModel(R.drawable.pic5,"热血屌丝的反杀"),
    )
    override fun initData() {
        binding.banner.setAdapter(ImageAdapter(bannerModels))
            .setIndicator(CircleIndicator(context))
            .setPageTransformer(DepthPageTransformer())
    }
}